<?php

namespace SSystems\RecipesBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

use SSystems\RecipesBundle\Entity\Recipe;
use SSystems\RecipesBundle\Entity\RecipeImage;

class DefaultController extends Controller
{
    /**
     * @Route("/",name="index")
     * @Template()
     */
    public function indexAction()
    {
    	$recipes = $this->getDoctrine()
        ->getRepository('SSystemsRecipesBundle:Recipe')
        ->findAll();

        return array('recipes' => $recipes);
    }

}
